package hhh.app.presenter.di.module;

import android.app.Application;
import android.content.Context;

import javax.inject.Singleton;

import dagger.Module;
import dagger.Provides;
import hhh.app.data.repository.ProductDataRepository;
import hhh.app.domain.repository.ProductRepository;

/**
 * Created by hhh on 2016/11/23.
 */
@Module
public class AppModule {
    Application mApplication;

    public AppModule(Application mApplication) {
        this.mApplication = mApplication;
    }

    @Provides
    @Singleton
    Context provideContext(){return mApplication;}

    @Provides
    @Singleton
    ProductRepository provideProductRepository(ProductDataRepository productDataRepository){
        return productDataRepository;
    }
}
